package com.zs.leymovie.utils;

import android.content.Context;

import com.zs.leymovie.R;

import cn.sharesdk.onekeyshare.OnekeyShare;

/**
 * Created by Administrator on 2015/8/20 0020.
 */
public class ShareHelper {


    public static void showShare(Context context,String content){
        OnekeyShare oks = new OnekeyShare();
        //关闭sso授权
        oks.disableSSOWhenAuthorize();

// 分享时Notification的图标和文字  2.5.9以后的版本不调用此方法
        //oks.setNotification(R.drawable.ic_launcher, getString(R.string.app_name));
        // title标题，印象笔记、邮箱、信息、微信、人人网和QQ空间使用
        oks.setTitle(context.getString(R.string.share));

        // text是分享文本，所有平台都需要这个字段
        oks.setText(content);

        //分享失败---log调试日志
        /*oks.setCallback(new PlatformActionListener(){
            @Override
            public void onComplete(Platform platform, int i, HashMap<String, Object> hashMap) {
                UrlConstants.getPrompt();
            }

            @Override
            public void onError(Platform platform, int i, Throwable throwable) {
                Log.e(platform.toString(),throwable.toString());
            }

            @Override
            public void onCancel(Platform platform, int i) {

            }
        });*/

        oks.setSilent(true);
// 启动分享GUI
        oks.show(context);
    }
}
